<?php defined('InShopNC') or exit('Access Invalid!');?>
<div class="ncm-container">
<?php include template('member/member_left');?>
  <div class="right-layout">
<div class="ncm-oredr-show">
  <div class="ncm-order-info">
    <div class="ncm-order-details">
      <div class="title"><?php echo $lang['member_pointorder_info_ordersimple'];?></div>
      <div class="content">
        <dl>
		  <dt><?php echo $lang['member_pointorder_info_shipinfo_truename'].$lang['nc_colon'];?></dt>
		  <dd><?php echo $output['order_info']['point_truename']; ?></dd>
          <dt><?php echo $lang['member_pointorder_info_shipinfo_mobphone'].$lang['nc_colon'];?></dt>
          <dd><?php echo $output['order_info']['point_mobphone']; ?>&nbsp;</dd>
          <dt><?php echo $lang['member_pointorder_info_shipinfo_address'].$lang['nc_colon'];?></dt>
          <dd><span><?php echo $output['order_info']['point_areainfo']; ?><?php echo $output['order_info']['point_address']; ?></span></dd>
          <?php if ($output['order_info']['point_ordermessage']){ ?>
            <dt><?php echo $lang['member_pointorder_info_ordermessage'].$lang['nc_colon'];?></dt>
            <dd><?php echo $output['order_info']['point_ordermessage']; ?></dd>
          <?php } ?>
        </dl>
		<dl class="line">
		  <?php if ($output['order_info']['point_shippingcode'] != ''){?>
          <dt><?php echo $lang['member_pointorder_shipping_code'].$lang['nc_colon'];?></dt>
          <dd><?php echo $output['order_info']['point_shippingcode']; ?></dd>
          <?php }?>
          <dt><?php echo $lang['member_pointorder_ordersn'].$lang['nc_colon'];?></dt>
          <dd><?php echo $output['order_info']['point_ordersn']; ?><a href="javascript:void(0);">更多<i class="icon-angle-down"></i>
            <div class="more"><span class="arrow"></span>
              <ul>
			    <li><?php echo $lang['member_pointorder_info_shipinfo_zipcode'].$lang['nc_colon'];?><span><?php echo $output['order_info']['point_zipcode']; ?></span></li>
                <li><?php echo $lang['member_pointorder_info_memberemail'].$lang['nc_colon'];?><span><?php echo $output['order_info']['point_buyeremail']; ?></span></li>
                <li><?php echo $lang['member_pointorder_addtime'].$lang['nc_colon'];?><span><?php echo @date('Y-m-d H:i:s',$output['order_info']['point_addtime']);?></span></li>
                <?php if ($output['order_info']['point_shippingdesc'] != ''){?>
                <li><?php echo $lang['member_pointorder_info_shipinfo_description'].$lang['nc_colon'];?><span><?php echo $output['order_info']['point_shippingdesc']; ?></span></li>
                <?php }?>
			  </ul>
            </div>
            </a></dd>
        </dl>
      </div>
    </div>
    <div class="ncm-order-condition">
      <div class="ncm-order-step">
        <dl class="step-first <?php if ($output['order_info']['point_addtime'] != ''){?>current<?php }?>">
          <dt>提交兑换</dt>
          <dd class="bg"></dd>
          <dd class="date" title="<?php echo $lang['member_pointorder_addtime'];?>"><?php echo @date('Y-m-d H:i:s',$output['order_info']['point_addtime']);?></dd>
        </dl>
        <dl class="<?php if ($output['order_info']['point_shippingtime'] != ''){?>current<?php }?>">
          <dt>礼品发货</dt>
          <dd class="bg"> </dd>
          <dd class="date" title="<?php echo $lang['member_pointorder_shipping_time'];?>"><?php echo @date('Y-m-d H:i:s',$output['order_info']['point_shippingtime']);?></dd>
        </dl>
        <dl class="<?php if ($output['order_info']['point_finnshedtime'] != ''){?>current<?php }?>">
          <dt>确认收货</dt>
          <dd class="bg"> </dd>
          <dd class="date" title="<?php echo $lang['member_pointorder_state_finished'];?>"><?php echo @date('Y-m-d H:i:s',$output['order_info']['point_finnshedtime']);?></dd>
        </dl>
      </div>
    </div>
  </div>
  <div class="ncm-order-contnet">
    <table class="ncm-default-table order">
      <thead>
        <tr>
          <th class="w10"></th>
          <th colspan="2"><?php echo $lang['member_pointorder_info_prodinfo'];?></th>
          <th class="w120"><?php echo $lang['member_pointorder_exchangepoints'];?></th>
          <th class="w100"><?php echo $lang['member_pointorder_exnum'];?></th>
          <th class="w100">状态</th>
          <th class="w150">兑换单操作</th>
        </tr>
      </thead>
        <tbody>
          <?php if(is_array($output['prod_list']) and !empty($output['prod_list'])) {
	  		foreach($output['prod_list'] as $val) {?>
          <tr>
            <td></td>
            <td class="w50"><div class="pic-thumb"><a href="<?php echo urlShop('pointprod', 'pinfo', array('id' => $val['point_goodsid']));?>" target="_blank"> <img src="<?php echo UPLOAD_SITE_URL.DS.ATTACH_POINTPROD.DS.str_ireplace('.', '_small.', $val['point_goodsimage']);?>" onerror="this.src='<?php echo UPLOAD_SITE_URL.DS.defaultGoodsImage(60);?>'" onMouseOver="toolTip('<img src=<?php echo UPLOAD_SITE_URL.DS.ATTACH_POINTPROD.DS.str_ireplace('.', '_small.', $val['point_goodsimage']);?>>')" onMouseOut="toolTip()" /></a></div></td>
            <td class="tl"><dl class="goods-name">
                <dt><a href="<?php echo urlShop('pointprod', 'pinfo', array('id' => $val['point_goodsid']));?>" target="_blank"><?php echo $val['point_goodsname']; ?></a></dt>
              </dl></td>
            <td class="bdl"><?php echo $val['point_goodspoints']; ?></td>
            <td class="bdl"><?php echo $val['point_goodsnum']; ?></td>
            <td class="bdl" rowspan="1"><?php echo $output['order_info']['point_orderstatetext']['order_state']; ?><?php echo $output['order_info']['point_orderstatetext']['change_state'] ==''?'':','.$output['order_info']['point_orderstatetext']['change_state'];?></td>
			<td class="bdl bdr" rowspan="1">
			  <?php if ($output['order_info']['point_orderstate'] == 30) { ?>
			  <p><a href="javascript:void(0)" class="ncm-btn ncm-btn-orange" onclick="drop_confirm('<?php echo $lang['member_pointorder_confirmreceivingtip']; ?>','index.php?act=member_pointorder&op=receiving_order&order_id=<?php echo $val['point_orderid']; ?>');"><?php echo $lang['member_pointorder_confirmreceiving']; ?></a></p>
			  <?php } ?>
			  <?php if (($output['order_info']['point_shippingcharge'] == 1 && $output['order_info']['point_orderstate'] == 10) || ($output['order_info']['point_shippingcharge'] != 1 && $output['order_info']['point_orderstate'] == 20)) { ?>
			  <p><a href="javascript:void(0)" class="ncm-btn ncm-btn-orange" onclick="drop_confirm('<?php echo $lang['member_pointorder_cancel_confirmtip']; ?>','index.php?act=member_pointorder&op=cancel_order&order_id=<?php echo $val['point_orderid']; ?>');"><?php echo $lang['member_pointorder_cancel_title']; ?></a></p>
			  <?php } ?>
			  <?php if ($output['order_info']['point_shippingcharge'] == 1 && $output['order_info']['point_orderstate'] == 10) { ?>
			  <p><a href="index.php?act=pointcart&op=step3&order_id=<?php echo $val['point_orderid']; ?>" class="ncm-btn ncm-btn-orange"><?php echo $lang['member_pointorder_pay']; ?></a> </p>
			  <?php } ?>
			</td>
          </tr>
          <?php } }?>
        </tbody>
      <tfoot>
        <tr>
          <td colspan="20"><dl class="freight">
              <dt><?php echo $lang['member_pointorder_shippingfee'].$lang['nc_colon'];?></dt>
              <dd><?php echo $output['order_info']['point_shippingfee'];?></dd>
            </dl>
            <dl class="sum">
              <dt>兑换单所需：</dt>
              <dd><em><?php echo $output['order_info']['point_allpoint']; ?></em>分</dd>
            </dl></td>
        </tr>
      </tfoot>
    </table>
  </div>
</div>  

      <?php if ($output['order_info']['point_shippingcharge'] == 1){?>
      <h3><?php echo $lang['member_pointorder_info_paymentinfo'];?></h3>
      <dl>
        <dt><?php echo $lang['member_pointorder_payment'].$lang['nc_colon'];?></dt>
        <dd><?php echo $output['order_info']['point_paymentname']; ?></dd>
        <?php if ($output['order_info']['point_paymenttime'] != ''){?>
        <dt><?php echo $lang['member_pointorder_info_paymenttime'].$lang['nc_colon'];?></dt>
        <dd><?php echo @date('Y-m-d H:i:s',$output['order_info']['point_paymenttime']);?></dd>
        <?php } ?>
        <dt class="cb"><?php echo $lang['member_pointorder_info_paymentmessage'].$lang['nc_colon'];?></dt>
        <dd style="width:90%;">        
        <?php $tmp = @unserialize($output['order_info']['point_paymessage']); ?>
        <?php if (is_array($tmp) && count($tmp)>0){ ?>
	      	<?php if ($tmp['user']) echo $lang['pay_bank_user'].' '.stripslashes($tmp['user']);?>
	      	<?php if ($tmp['bank']) echo $lang['pay_bank_bank'].' '.stripslashes($tmp['bank']);?>
	      	<?php if ($tmp['account']) echo $lang['pay_bank_account'].' '.stripslashes($tmp['account']);?>
	      	<?php if ($tmp['num']) echo $lang['pay_bank_num'].' '.stripslashes($tmp['num']);?>
	      	<?php if ($tmp['date']) echo $lang['pay_bank_date'].' '.stripslashes($tmp['date']);?>
	      	<?php if ($tmp['order']) echo $lang['pay_bank_order'].' '.stripslashes($tmp['order']);?>
	      	<?php if ($tmp['extend']) echo $lang['pay_bank_extend'].' '.stripslashes($tmp['extend']);?>
	    <?php }else{?>
        	<?php echo $output['order_info']['point_paymessage']; ?>
        <?php } ?>
        </dd>
      </dl>
      <?php }?>

  </div>
  <div class="clear"></div>
</div>